<%-- 
    Document   : formularioFichaFrequencia
    Created on : 03/11/2011, 01:30:02
    Author     : Gomes
--%>


<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Sistema Gerenciador de Estágios da Facom</title>
    </head>
    <body>
        <h1>Nova Ficha de Frequência</h1>
        <form method="POST" action="${pageContext.request.contextPath}/salvarFichaFrequencia">
            <p><label>Referente ao mês (mm/aaaa): </label><input name="referenteAoMes" type="text" value="${referenteAoMes}"></p>
            <table border="1">
                <tr style="background-color:gray">
                    <th rowspan="2">Data</th>                    
                    <th colspan="2">Horário de Trabalho</th>
                    <th rowspan="2">Atividades</th>
                </tr>
                <tr style="background-color:gray">
                    <td>Início</td><td>Término</td>                    
                </tr>
                <c:forEach var="i" begin="1" end="20">
                    <tr>
                        <td><input type="text" name="data${i}" value="${tabela.get((i-1)*4)}"/></td>
                        <td>
                            <select name="horarioInicio${i}">
                                <option value="">                        
                                </option>
                                <c:forEach var="j" begin="7" end="22">
                                    <option value="${j}" <c:if test="${tabela.get((i-1)*4+1) eq j}"> selected </c:if>>
                                        ${j}h
                                    </option>
                                </c:forEach>                   
                            </select>
                        </td>
                        <td>
                            <select name="horarioTermino${i}">       
                                <option value="">                        
                                </option>
                                <c:forEach var="j" begin="8" end="23">
                                    <option value="${j}" <c:if test="${tabela.get((i-1)*4+2) eq j}"> selected </c:if>>
                                        ${j}h
                                    </option>
                                </c:forEach>                   
                            </select>
                        </td>
                        <td><input type="text" name="atividades${i}" value="${tabela.get((i-1)*4+3)}"/></td>
                    </tr>
                </c:forEach>                
            </table>
            <input type="submit"/>
        </form>
    </body>
</html>
